<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Retreives the current address to which the
  socket is bound.</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventutil.getsocketfd.html">EventUtil::getSocketFd</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventutil.setsocketoption.html">EventUtil::setSocketOption</a></div>
 <div class="up"><a href="class.eventutil.html">EventUtil</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="eventutil.getsocketname" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">EventUtil::getSocketName</h1>
  <p class="verinfo">(PECL event &gt;= 1.5.0)</p><p class="refpurpose"><span class="refname">EventUtil::getSocketName</span> &mdash; <span class="dc-title">Retreives the current address to which the
  socket is bound.</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-eventutil.getsocketname-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="modifier">static</span>
   <span class="type">bool</span> 
   <span class="methodname"><strong>EventUtil::getSocketName</strong></span>
    ( <span class="methodparam">
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
     <code class="parameter">$socket</code>
   </span>
   , <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter reference">&$address</code>
   </span>
   [, <span class="methodparam">
    <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span>
     <code class="parameter reference">&$port</code>
   </span>
  ] )</div>

  <p class="para rdfs-comment">
   Retreives the current address to which the
   <em><code class="parameter">socket</code></em>
   is bound.
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-eventutil.getsocketname-parameters">
  <h3 class="title">参数</h3>
  <dl>

   
    <dt>

     <em><code class="parameter">socket</code></em>
    </dt>

    <dd>

     <p class="para">
      Socket resource, stream or a file descriptor of a socket.
     </p>
    </dd>

   
   
    <dt>

     <em><code class="parameter">address</code></em>
    </dt>

    <dd>

     <p class="para">
      Output parameter. IP-address, or the UNIX domain socket path depending
      on the socket address family.
     </p>
    </dd>

   
   
    <dt>

     <em><code class="parameter">port</code></em>
    </dt>

    <dd>

     <p class="para">
      Output parameter. The port the socket is bound to. Has no meaning for
      UNIX domain sockets.
     </p>
    </dd>

   
  </dl>

 </div>

 <div class="refsect1 returnvalues" id="refsect1-eventutil.getsocketname-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns <strong><code>TRUE</code></strong> on success. Otherwise <strong><code>FALSE</code></strong>.
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="eventutil.getsocketfd.html">EventUtil::getSocketFd</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="eventutil.setsocketoption.html">EventUtil::setSocketOption</a></div>
 <div class="up"><a href="class.eventutil.html">EventUtil</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
